<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品列表内高级搜索</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 100%;
            height: 450px;
            margin: 0 auto;
        }
        .left{
            margin-left: 150px;
            width: 200px;
            height: 350px;
            float: left;
        }
        .right{
            margin-left: 150px;
            width: 200px;
            height: 350px;
            float: left;
        }
        .bottom{
            margin-top: 20px;
            float: left;
            margin-left: 510px;
            width: 200px;
            height: 50px;
        }
        p{
            margin-top: 50px;
        }
        body{
            background-color:rgb(243,243,243);
        }
    </style>
</head>
<body>
<div class="box">
    <form class="layui-form">
        <div class="left">
            <p> 商品编号：</p>
            <div class="layui-input-inline">
                <input type="text" id="productCode" name="productCode" required lay-verify="required" placeholder="商品编号" autocomplete="off" class="layui-input">
            </div>
            <p> 商品状态：</p>
            <div class="layui-input-inline">
                <select class="layui-select" name="productSate" id="productSate">
                    <option value=""></option>
                    <option value="0">已删除</option>
                    <option value="1">上架</option>
                    <option value="2">下架</option>
                </select>
            </div>
            <p> 商品价格：</p>
            <div class="layui-input-inline">
                <input type="text" id="currentpriceProduct" name="currentpriceProduct" required lay-verify="required" placeholder="商品价格" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="right">
            <p> 商品分类：</p>
            <div class="layui-input-inline">
                <select class="layui-select" name="title" id="title">
                    <option value=""></option>
                </select>
            </div>
            <p> 商品名称：</p>
            <div class="layui-input-inline">
                <input type="text" id="productName" name="productName" required lay-verify="required" placeholder="商品名称" autocomplete="off" class="layui-input">
            </div>
            <p> 商品标签：</p>
            <div class="layui-input-inline">
                <input type="text" id="productLabel" name="productLabel" required lay-verify="required" placeholder="商品标签" autocomplete="off" class="layui-input">
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['jquery','layer','table','form'],function(){
        var $=layui.jquery;
        var layer=layui.layer;
        var form=layui.form;

        $.ajax({
            url: '/SyStatistical/getSyProductCategroys',
            dataType: 'json',
            type: 'post',
            success: function (data) {
                var syProductCategroys = data.data;
                for (var i = 0; i < syProductCategroys.length; i++) {
                    $('#title').append('<option value="' + syProductCategroys[i].title + '" >' + syProductCategroys[i].title + '</option>')

                }
                form.render('select');
            }
        });

    })
</script>
</body>
</html>